Skip to content

test(nikto): add malformed-output tests for parser fallback paths #1420#1983

Merged
utksh1 merged 1 commit into
utksh1:mainfrom
NaitikVerma6776:issue-#1420
Jul 9, 2026
Merged

test(nikto): add malformed-output tests for parser fallback paths #1420#1983
utksh1 merged 1 commit into
utksh1:mainfrom
NaitikVerma6776:issue-#1420

Conversation

@NaitikVerma6776

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a dedicated unit test suite (test_nikto_parser_malformed.py) covering Nikto parser fallback paths for malformed, empty, and partial output.
  • Covers malformed numeric/port fields, empty JSON/text output, partial vulnerability records, invalid JSON fallback to text parsing, and embedded JSON block extraction.
  • Verifies the parser returns a stable findings/count/metadata/summary structure without raising unexpected exceptions.

Closes #1420

Test plan

  • python -m pytest testing/backend/unit/test_nikto_parser_malformed.py -v
  • All 19 new tests pass
  • No changes to plugins/nikto/parser.py production code

Lock down graceful Nikto parser behavior for empty, partial, and
malformed JSON/text output so fallback paths stay stable without raising.

Co-authored-by: Cursor <cursoragent@cursor.com>
@NaitikVerma6776 NaitikVerma6776 added level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label gssoc:approved Admin validation: approved for GSSoC scoring priority:low Nice-to-have issue with low urgency area:plugins Scanner plugin metadata, schemas, or plugin runtime work and removed priority:low Nice-to-have issue with low urgency labels Jul 9, 2026
@utksh1 utksh1 merged commit 7ea9e4d into utksh1:main Jul 9, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:plugins Scanner plugin metadata, schemas, or plugin runtime work gssoc:approved Admin validation: approved for GSSoC scoring level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PLUGINS] Add malformed-output tests for Nikto parser fallback paths

2 participants